package com.ysh.function;

import com.ysh.pojo.User;

import java.util.function.Function;

/**
 * 袁胜虎 on 2022/9/2 15:27
 */
public class FunctionTest {

    public static  void main(String[] args){
//        Function 引入式函数编程
        Function<String, User> function = (name)->{
            User user = new User();
            user.setName(name);
            return user;
        };
        User user = function.apply("laozhu");
        System.err.println(user);
    }
}
